function text_ = gXpupil_text

% text and lines for the continuous/gamepad task

% striped background texture
sq=[1024, 1280]

% %these were the original values commented out by mn on 4/14 during a test
% high = 8;
% low = 0;
% mid = 3;


 high = 4;  % These are approximately isoluminant, and are a good low luminance test set
 low = 0;
 mid = 1;

%   high= 16;  % These are approximately isoluminant, and are a good high %  luminance test set
%   low = 0;
%   mid = 5;

arg_dXtexture = { ...
    'textureFunction',  'textureChecker',  ...
    'textureArgs',      {num2cell(sq./4), num2cell(sq./16)}, ...
    'color',            low, ...
    'bgColor',          high, ...
    'visible',          {true, false}, ...
    'filterMode',       0, ...
    'w',                inf, ...
    'h',                inf};

frac=(256.*mid./20)


% #1 = randomly generated number
% #2 = subject's estimate of the "average"
% #3 = error made by subject (not currently used or shown)
% #4 = random start position (only used if half==1)
%

gr = [1 1 1]*mid;
arg_dXtext = { ...
    'bold',     true, ...
    'size',     num2cell([80, 80, 1, 1, 1]), ...
    'string',   cat(2, {'', '0', '0', 'start', '1'}),...
    'x',        num2cell([-1.75, -1.75, 100, 100, 100]), ...
    'y',        num2cell([2, 0, 100, 100, 100]), ...
    'visible',  true, ...
    'color',    num2cell([gr; gr; gr; gr; gr], 2)};


% #1 = position of randomly generated number
% #2 = position of subject's estimate of the "average"
% #3 = reference line below estimate
% #4 = dot in middle for recalibration
arg_dXline = { ...
    'x1',       num2cell([-15,  -15, -1.75, -.1]), ...
    'y1',       num2cell([100,    100,   -2.1, 0]), ...
    'x2',       num2cell([-15,  -15, 1.75, .1]), ...
    'y2',       num2cell([100,    100,   -2.1, 0]), ...
    'visible',  true, ...
    'penWidth', num2cell([10,   10,  10, 10]), ...
    'color',    num2cell([gr;   gr;  gr; [1 1 1]],  2)};


    static = {'current', false, true, true};
text_ = { ...
    'dXtext',  5,	static,	arg_dXtext; ...
    'dXline',  4,	static,	arg_dXline; ...
    'dXtexture', 2,	static,	arg_dXtexture}; 
 